package com.hnust.api;

import com.hnust.domain.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;


@FeignClient(
        name = "teacherApis",
        url = "${feign.baseUrl}"
)
public interface TeacherApis {
    @PostMapping("/api/teacher/login")
    Result<LoginData> teacherLogin(@RequestParam("faculty_number") String account,
                                   @RequestParam("password") String password);

    @PostMapping("/api/teacher/register")
    Result<Boolean> register(
            @RequestParam("name") String name,
            @RequestParam("number") String number,
            @RequestParam("password") String password,
            @RequestParam("phone") String phone,
            @RequestParam("email") String email,
            @RequestParam("collegeId")String collegeId
    );

    //获取课程组信息
    @GetMapping("/api/teacher/getCourseInfo")
    Result<GroupResult> getCourseInfo(@RequestParam("teacherId") String id,
                                             @RequestParam("groupId") String group_id,
                                             @RequestParam("nowPage") Integer now_page);

    //获取老师信息
    @GetMapping("/api/teacher/getInfo")
    Result<UserInfo> getInfo(@RequestParam("teacherId") String id);

    //获取课程目标
    @GetMapping("/api/subject/getCourseTargetList")
    Result<List<SubjectData>> getCourseTargetList(@RequestParam("id") String id,
                                                  @RequestParam("course_id") String course_id);

    //按名字查找课程组成员
    @GetMapping("/api/teacher/getCourseTeaByName")
    Result<List<GroupMember>> getCourseTeaByName(@RequestParam("groupId") String group_id,
                                                 @RequestParam("teacherName") String teacher_name);

    //获取所有学院
    @GetMapping("/api/teacher/getAllCollege")
    Result<List<College>> getAllCollege();
}
